package com.meilai.project.controller.web.report.helper;

import java.util.*;

/**
 * @author chenxing
 */
public class WorkOrderHelper {
    private static final Map<Integer, String> type2NameMap = new LinkedHashMap<>();
    private static final Map<Integer, Integer> typeReportSortMap = new LinkedHashMap<>();

    static {
        type2NameMap.put(1, "新安装");
        type2NameMap.put(2, "上刊");
        type2NameMap.put(3, "下刊");
        type2NameMap.put(4, "巡检");
        type2NameMap.put(5, "维修");
        type2NameMap.put(7, "换画");
        type2NameMap.put(8, "中间监播");
    }

    static {
        typeReportSortMap.put(1, 7);
        typeReportSortMap.put(2, 1);
        typeReportSortMap.put(3, 2);
        typeReportSortMap.put(4, 5);
        typeReportSortMap.put(5, 6);
        typeReportSortMap.put(7, 3);
        typeReportSortMap.put(8, 4);
    }

    public static List<Integer> typeIds(){
        return new ArrayList<>(type2NameMap.keySet());
    }

    public static String getWorkOrderName(Integer type) {
        return type2NameMap.get(type);
    }

    public static int getWorkOrderTypeSort(Integer type) {
        return typeReportSortMap.get(type);
    }

}
